package com.web.rabitmq.sender.com.web.controller;

import com.web.rabitmq.sender.com.web.service.SendMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 发送消息接口
 */
@RestController
@RequestMapping("/sendMsg")
public class SendMsgController {
    @Autowired
    private SendMsgService sendMsgService;

    /**
     * 发送消息
     * @return
     */
    @RequestMapping("/sendDirect")
    @ResponseBody
    public String sendDirect(){
        sendMsgService.sendDirect("这是topic接口发送的消息");
        return "ok";
    }
}
